<?php
declare(strict_types=1);
namespace cms\sms\admin\mvc_controller;

use cms\sms\service\PlatformService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\AutoController;
use Psr\Http\Message\ResponseInterface;

/**
 * Class PlatformController
 * @package cms\sms\admin\mvc_controller
 * @AutoController(prefix="mvc/sms/admin_platform")
 */
class PlatformController extends CommonController
{
    /**
     * @Inject()
     * @var PlatformService
     */
    protected PlatformService $platformService;
    /**
     * @return ResponseInterface
     */
    public function retrieve(): ResponseInterface
    {
        return $this->template();
    }

    /**
     * @return ResponseInterface
     */
    public function create(): ResponseInterface
    {
        // 类型
        $seder = $this->platformService->readSetting('platform')->get('seder');
        return $this->template([
            'seder' => $seder,
        ], 'form');
    }
}